<template>
  <div style="height: 90%;width: 100%;background-color: #ebeeea">
    <div style="width: 30%;height: 60%;margin-left: 35%;background-color: white;margin-top:30px" >
      <div style="text-align: center">
        <p style="font-size: 20px;font-weight: bold"> -- 个人信息 --</p>
        <p>id:{{id}}</p>
        <p>用户名:{{userName}}</p>
        <p>角色:{{role}}</p>
        <p>联系方式 :{{phone}}</p>
      </div>
    </div>
  </div>
</template>

<<script>
  export default {
    data() {
      return {
        id:'',
        userName:'',
        phone:'',
        role:'',
        address:''

      }
    },
    mounted: function() {

      console.log("初始化了hhhh")
      var user = JSON.parse(window.sessionStorage.getItem("user"));
      console.log(user)
      this.id = user.id
      this.userName = user.userName
      this.role = user.role
      this.phone = user.phone


      // axios.post('/factory/lookInfo',{
      //   id : this.id,
      //   hh : this.id
      // }).then((response) => {
      //   console.log(response.data);
      //   if( response.data != 800){
      //     this.$notify({
      //       title: '成功',
      //       message: '成功',
      //       type: 'success',
      //       duration:2000
      //     });
      //     this.id=response.data.id
      //     this.userName=response.data.userName
      //     this.phone=response.data.phone
      //     this.sex=response.data.sex
      //     this.address=response.data.address
      //     //  window.sessionStorage.setItem("user", JSON.stringify(response.data.user));
      //     // var token= window.sessionStorage.getItem("token");
      //     //var user= JSON.parse(window.sessionStorage.getItem("user"));
      //
      //   }
      //   else{
      //     this.$notify({
      //       title: '失败',
      //       message: '错误',
      //       type: 'warning',
      //       duration:2000
      //     });
      //   }
      // })},
    },
    methods:{

    }
  }
</script>
<style>
</style>
